import numpy as np
import matplotlib.pyplot as plt
from itertools import permutations
from basic import *


array = (0, 1, 2, 3)
perms = list(permutations(array))

plt.figure(figsize=(10, 7))
for p, perm in enumerate(perms):
	plt.subplot(4, 6, p+1)
	plt.grid(True)
	plt.xticks(np.arange(0, len(array), 1), array)
	plt.yticks(np.arange(0, len(array), 1), array)
	plt.plot(perm)
	plt.title('Permutation {}'.format(p+1))
# plt.suptitle('Permutations of {}'.format(array))
plt.tight_layout()
plt.savefig(PATH+'results/permutations.pdf', format='pdf')
plt.show()
